<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>健康上报系统</title>
    <link rel="stylesheet" type="text/css" href="/css/a.css">
</head>
<body bgcolor="#ffebcd">
    <h3>
        <form action="/userPage/index" method="post" th:align="right">
            <input type="submit" value="退出系统"/>
        </form>
        <a th:href="@{/admin/personList}">用户列表</a><br>
        <a th:href="@{/admin/getDate}">打卡数据</a><br>
        <a th:href="@{/admin/getTodayNotSubmit}">今天未打卡的人</a>
    </h3>
    <h1 align="center">用户列表</h1>
    <div class="PersonTable">
        <table border="1" cellspacing="0" cellpadding="8">
            <tr>
                <th>学号/职工号</th>
                <th>姓名</th>
                <th>密码</th>
                <th>用户类型</th>
                <th>操作</th>
                <th>
                    <form action="/admin/ToPage/inputAdmin" method="post">
                        <input style="background-color: navajowhite" type="submit" value="新增管理员"/>
                    </form>
                </th>
            </tr>
            <tr th:each="var,rs:${personList}">
                <td th:text="${rs.current.getPersonId()}"></td>
                <td th:text="${rs.current.getName}"></td>
                <td th:text="${rs.current.getPassword()}"></td>
                <div th:if="${rs.current.getFlag() eq 1}">
                    <td><font color="#dc143c">管理员用户</font></td>
                </div>
                <div th:if="${rs.current.getFlag() eq 0}">
                    <td>普通用户</td>
                </div>
                <td>
                    <a th:href="@{'/admin/editPerson/' + ${rs.current.getPersonId()} }">编辑</a>
                </td>
                <td style="padding-left: 30px"><a th:href="@{'/admin/deletePerson/'+ ${rs.current.getPersonId()} }">删除</a></td>
            </tr>
        </table>
    </div>

</body>
</html>
